# FROM registry.cn-hangzhou.aliyuncs.com/hrfax/node:12.9.1 as builder
FROM 192.168.0.40/library/node:10.16.3
WORKDIR /usr/src/app/
USER root
COPY package.json ./
# RUN apt-get update && apt-get install -y nginx
# RUN yarn
RUN npm install --registry=https://registry.npm.taobao.org
COPY . /usr/src/app

# RUN npm run test:all

# RUN npm run fetch:blocks

# RUN npm run start

EXPOSE 8001
EXPOSE 8002

# CMD ["nginx", "-g", "daemon off;"]
# CMD ["nginx", "-g", "daemon off;", "-c", "/etc/nginx/nginx.test.conf"]